﻿using System.Xml.Serialization;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace PhoenixCrabV6.Engine.Images
{
    public interface IDrawable : IUpdateable
    {
        /// <summary>
        /// Draws the image with the upper left corner as the reference point
        /// </summary>
        /// <param name="spriteBatch"></param>
        void Draw(SpriteBatch spriteBatch);
    }

    public interface IUpdateable
    {
        void Update(GameTime gameTime);

        void LoadContent();

        void UnloadContent();
    }

    public interface IImage : IDrawable
    {
        /// <summary>
        /// The rendered display image
        /// </summary>
        [XmlIgnore] Texture2D DisplayImage { get; set; }

        /// <summary>
        /// Positioning information
        /// </summary>
        Vector2 Position { get; set; }

        /// <summary>
        /// Alpha value override
        /// </summary>
        float Alpha { get; set; }

        /// <summary>
        /// Scaling information
        /// </summary>
        Vector2 Scale { get; set; }
    }
}